<?php
$province_id = $_GET['province_id'];
$citys = [];
if (!empty($province_id)) {
    // 数据库查询  select * from citys where province_id = $province_id
    if ($province_id == 1) {
        $citys = [
            [
                'id' => 1,
                'title' => '石家庄'
            ],
            [
                'id' => 2,
                'title' => '衡水'
            ],
            [
                'id' => 3,
                'title' => '保定'
            ],
        ];
    }
    if ($province_id == 2) {
        $citys = [
            [
                'id' => 1,
                'title' => '郑州'
            ],
            [
                'id' => 2,
                'title' => '安阳'
            ],
            [
                'id' => 3,
                'title' => '洛阳'
            ],
        ];
    }

}
?>
<option value="0">请选择城市</option>
<?php foreach ($citys as $c):?>
    <option value="<?php echo $c['id'];?>"><?php echo $c['title'];?></option>
<?php endforeach;?>
